hbu
===

The hbu tool is designed to facilitate both:
* Maintaining a nicely organized directory of files.
* Easy to back up the important changes without copying everything over.

concepts
==

The important concepts are

* The `dump` this is just a flat folder with every file dumped inside it, files are renamed to their hash.
* The `tidy` this is a nice organized folder hierarchy with symlinks to the dump in it.
* 'stashing' when a file in the tidy is hashed, moved to the dump and a symlink is put in its place.
* The configuration files: files named `<n>.scm` are stored inside config/ subdirectory of the dump. They are a history of the states of the tidy. Only the newest is looked at.

This enables you to reproduce the tidy from the dump+config (if the tidy was deleted for example, or if you just copied the dump over to a separate computer).

commands
==

There are two main commands:

* `hbu curate <dump-path> [tidy-path]`

curate will initialize a dump with a new config file.
if the config file already existed it will try to wipe the tidy and populate it with the setup that was stored last.

* `hbu store <dump-path>`

store will search for any renamed/moved files, newly added and any deleted files. It will stash the new files and update its config about where everything is.

* `hbu gc`

delete things from the dump which aren't referenced by the current config.

installing
==

To install, let guile find the modules:

```
cd ~/Code/guile-modules/
ln -s /home/rain/Code/repos/hbu/hbu .
```

(note that it depends on guix for hashing)

and add the binary to PATH:

```
cd ~/bin
ln -s ~/Code/repos/hbu/bin/hbu .
```
